package cn.iocoder.yudao.module.carbon.api.emissionfactor;

import cn.iocoder.yudao.framework.common.pojo.CommonResult;
import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.module.carbon.api.emissionfactor.dto.EmissionFactorPageReqDTO;
import cn.iocoder.yudao.module.carbon.api.emissionfactor.dto.EmissionFactorRespDTO;
import cn.iocoder.yudao.module.carbon.enums.ApiConstants;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import javax.validation.Valid;

@FeignClient(name = ApiConstants.NAME)
@Tag(name = "RPC 服务 - 碳排放因子")
public interface EmissionFactorApi {

    String PREFIX = ApiConstants.PREFIX + "/emission-factor";

    @PostMapping(PREFIX + "/page")
    @Operation(summary = "获得碳排放因子分页")
    CommonResult<PageResult<EmissionFactorRespDTO>> getEmissionFactorPage(@Valid @RequestBody EmissionFactorPageReqDTO reqDTO);

}
